/**
 * TableSetDao.java
 *
 * Copyright (c) 2010 Prj.Manager All Rights Reserved.
 *
 * This source file may not be copied, modified or redistributed,
 * in whole or in part, in any form or for any reason, without the express
 * written consent of Prj.Manager .
 **/

package ro.prjmanager.dao;

import ro.prjmanager.core.dao.GenericDAO;
import ro.prjmanager.model.Projects;
import ro.prjmanager.model.TableSet;

import java.util.List;

/**
 * This interface provides custom method declaration for TableSet
 * entity and has a default implementation in the same package :
 * TableSetDAOImpl
 * @author Viorel Tacliciu
 * @version 2
 */

public class TableSetDao extends GenericDAO<TableSet,  java.lang.Integer> {
    @Override
    public List<TableSet> findAll() {
        return super.findByHSQL("select c from "+getPersistentClass().getName()
                +" as c join c.fkProjectDb as d where d.fkProject.id="+((Projects)getUserSession().getProject()).getId()) ;        
    }
}
